package homework.test7;

public class MyThread7 implements Runnable{
    private int ticket = 100;
    @Override
    public void run() {
        while (true){
            if(ticket == 0){
                break;
            }else {
                ticket--;
                System.out.println(Thread.currentThread().getName()+"在卖票，还剩"+ticket+"张票");
            }
        }
    }
}
